name: Build Website

on:
  push:
    branches: [ "main" ]

jobs:

  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - name: Set up Go
      uses: actions/setup-go@v3
      with:
        go-version: 1.18

    - name: Install Magnanimous
      run: go install github.com/renatoathaydes/magnanimous@0.11.1

    - name: Build Website
      run: magnanimous -style monokai -globalctx=_gitlab_global_context
    
    - name: Deploy 🚀
      uses: JamesIves/github-pages-deploy-action@v4
      with:
        folder: target
